package com.lifeng.future;

/**
 * Created by lifeng on 2018/11/19.
 */
public class RealData implements MyData{
    private String data;

    public RealData(String data){
        // 利用sleep方法来表示RealData构造过程是非常缓慢的
        try {
            Thread.sleep(10000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        this.data = data;
    }

    @Override
    public String getResult() {
        return data;
    }
}
